import {App, Component} from "vue";
import WindowIcon from "./management-system/components/theme/system/icons/WindowIcon.vue";
import OrgIcon from "./management-system/components/theme/system/icons/OrgIcon.vue";
import UserInfoIcon from "./management-system/components/theme/system/icons/UserInfoIcon.vue";
import RoleIcon from "./management-system/components/theme/system/icons/RoleIcon.vue";
import AddUserIcon from "./management-system/components/theme/system/icons/AddUserIcon.vue";
import OrgManageIcon from "./management-system/components/theme/system/icons/OrgManageIcon.vue";
import RoleManageIcon from "./management-system/components/theme/system/icons/RoleManageIcon.vue";
import FuncRouterIcon from "./management-system/components/theme/system/icons/FuncRouterIcon.vue";
import FuncManageIcon from "./management-system/components/theme/system/icons/FuncManageIcon.vue";

const components = [
    /* 系统元素图标 */
    WindowIcon,
    OrgIcon,
    UserInfoIcon,
    RoleIcon,
    RoleManageIcon,
    AddUserIcon,
    OrgManageIcon,
    FuncManageIcon,
    FuncRouterIcon
]

const registerIcon = function (Vue:App) {
    components.forEach(component => {
        if (component.__name!==undefined){
            Vue.component(component.__name, component)
        }
        if (component.name!==undefined){
            Vue.component(component.name, component)
        }
    })
}

class Icons {
    // 文件类型图标映射
    FileIconMapping:Map<number, string>
    // 窗口图标映射
    WindowIconsMapping:Map<number, string>
    // 工具栏图标映射
    ToolIconsMapping:Map<number, string>
}

const AllIcons=new Icons()


AllIcons.FileIconMapping=new Map<number, string>()
AllIcons.FileIconMapping.set(0,"ChuangKouIcon")
AllIcons.FileIconMapping.set(1,"SystemFolderIcon")
AllIcons.FileIconMapping.set(2,"FileIcon")



AllIcons.WindowIconsMapping=new Map<number, string>()
AllIcons.WindowIconsMapping.set(0,"WindowIcon")
AllIcons.WindowIconsMapping.set(1,"SystemFolderIcon")
AllIcons.WindowIconsMapping.set(2,"FileIcon")


AllIcons.ToolIconsMapping=new Map<number, string>()



export {AllIcons,registerIcon}

